package com.sloan.community.repository;

import com.sloan.community.po.ArticleLikeCount;
import org.springframework.data.r2dbc.repository.R2dbcRepository;
import org.springframework.stereotype.Repository;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

@Repository
public interface LikeCountRepository extends R2dbcRepository<ArticleLikeCount, Long> {

    Flux<ArticleLikeCount> findByArticleId(Long articleId);

    Mono<Void> deleteByArticleIdAndUserId(Long articleId, Long userId);
}
